<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/6/15
 * Time: 13:29
 */
include  ("../util/Db_Base.php");
header("Content-Type:text/html; charset=utf-8");

$username = $_POST["username"];
$password = $_POST["password"];
$nickname = $_POST["nickname"];
$phone = $_POST["phone"];

$news = new Db_Base();
$sql="insert into t_user(id,username,password,nickname,phone) values (null,$username,$password,$nickname,$phone)";
$news-> insertData($sql);

echo '<script type="text/javascript">
    alert("注册成功！");
    window.location.href="../index.html";
</script>'

?>